(() => {

    goog.require('Mixly.Url');
    goog.require('Mixly.Config');
    goog.require('Mixly.NavEvents');
    goog.require('Mixly.StatusBar');
    goog.require('Mixly.XML');
    goog.require('Mixly.Nav');
    goog.require('Mixly.Env');
    goog.require('Mixly.Boards');
    goog.require('Mixly.Modules');
    goog.require('Mixly.ToolboxSearcher');
    goog.require('Mixly.Drag');
    goog.require('Mixly.Editor');
    goog.require('Mixly.LevelSelector');
    goog.require('WorkspaceSearch');
    goog.require('Backpack');
    goog.require('ContentHighlight');
    goog.require('ZoomToFitControl');
    goog.provide('Mixly.Interface');
    
    const {
        Url,
        Config,
        NavEvents,
        StatusBar,
        XML,
        Nav,
        Boards,
        Modules,
        Interface,
        Env,
        ToolboxSearcher,
        Drag,
        Editor,
        LevelSelector
    } = Mixly;
    
    Interface.feedback = () => {
        const href = 'https://gitee.com/xinnongren/Arduino_RP2040_RC3/issues';
        if (Env.isElectron) {
            const { electron } = Modules;
            const { shell } = electron;
            shell.openExternal(href);
        } else {
            window.open(href, '_blank');
        }
    };
    
    Interface.openWiki = () => {
        const href = 'https://wokwi.com/projects/new/pi-pico';
        if (Env.isElectron) {
            const { electron } = Modules;
            const { shell } = electron;
            shell.openExternal(href);
        } else {
            window.open(href, '_blank');
        }
    };

    Interface.programa = () => {
        const href = 'Assistant:';
        if (Env.isElectron) {
            const { electron, path } = Modules;
            const { shell } = electron;
            shell.openPath(path.resolve(Env.indexPath, './tools/serial_assistant.exe'));
        }
    }
    
})();